﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" 
CodeFile="EmailNotification.aspx.cs" Inherits="Administration_EmailNotification"
CodeFileBaseClass="BaseView" ViewName="EmailNotification" %>

<%@ Register Src="~/Controls/Common/ErrorNotification.ascx" TagName="ErrorNotification"
    TagPrefix="crux" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
  <script type="text/javascript">
      function unCheckedAllOption(idAllOption) {
          var allOption = document.getElementById(idAllOption);
          allOption.checked = false;
      }
      function ModeList(id) {
          var checkBoxes = id.getElementsByTagName("input");

          if (checkBoxes[0].checked) {
              for (i = 1; i < checkBoxes.length; i++) {
                  checkBoxes[i].checked = false;
              }
          }
      }
      function handleStates(idList, idAllOption) {
          var checkBoxes = document.getElementById(idList).getElementsByTagName("input");
          var allOption = document.getElementById(idAllOption);
          if (allOption.checked) {
              for (i = 0; i < checkBoxes.length; i++) {
                  checkBoxes[i].checked = true;
              }
          }
          else {
              for (i = 0; i < checkBoxes.length; i++) {
                  checkBoxes[i].checked = false;
              }
          }

      }
    </script>
    <asp:Panel ID="pnlAddEdit" runat="server">
        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="formTableReport">
            <tr>
                <td align="center">
                    <table border="0" cellpadding="0" cellspacing="0" width="60%">
                        <tr>
                            <td colspan="3" class="formGroupGap">
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 25%"></td>
                            <td align="left" valign="middle">
                                <asp:Label ID="lblNotificationMode" runat="server" Text="Notification Mode" CssClass="formLabel" />
                            </td>
                            <td align="left" valign="middle">
                                <asp:Label ID="lblNotificationStateChanges" runat="server" Text="Notification State Changes"
                                    CssClass="formLabel" />
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" class="formFieldGap">
                            </td>
                        </tr>
                        <tr>
                        <td></td>
                            <td align="left" valign="top">
                                <asp:CheckBoxList ID="chkBoxListNotificationMode" runat="server" onClick="ModeList(this)" />
                            </td>
                            <td align="left" valign="top">
                                <asp:Panel ID="pnlTreeView" runat="server">
                                    <asp:TreeView ID="treeViewNotificationStateList" runat="server" ShowCheckBoxes="Leaf" CssClass="formText">
                                    </asp:TreeView>
                                </asp:Panel>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3" class="formGroupGap">
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center" class="submitTd">
                   <asp:Button runat="server" ID="btnSave" Text="Save" OnClick="btnSave_Click" />
                    <asp:Button runat="server" ID="btnReset" Text="Reset" OnClick="btnReset_Click" />
                    <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" />
                </td>
            </tr>
        </table>
    </asp:Panel>
    <crux:ErrorNotification ID="pnlError" runat="server" />
</asp:Content>

